<?php 
class Modules_Projects_View_Menu
{
	var $options=array(0=>"List Project",1=>"Create Project");
	var $select;
	var $option_not_selectable=null;
	public function __construct($selected)
	{
			$this->select=$selected;
	}
	function draw()
	{
		$str.= "<ul id=\"leftMenu\">";
			foreach($this->options as $key=>$opt)	
				$str.="<li ".($this->selected==$key?"class=\"selected\"":"")." id=\"menu_".$key."\"><a style=\"cursor:pointer\" onClick=\"ChangeLateral(".$key.")\">".$opt."</a></li>";
		$str.= "</ul>";
		
		return $str;
	}
	public function addOption($opt)
	{
		$this->option_not_selectable=$opt;
	}
	public function module($id)
	{
		switch($id)
		{
			case 0:
				return new Modules_Projects_View_ListProjects();
			case 1:
				return new Modules_Projects_View_CreateProject();	
		}
	}
}
?>